/****************************************************************************
 * @file    : lin_eeprom.h
 * @author  : Nonosns MCU Team
 * @version : V2.0
 * @Date    : 2023/4/7
 * @brief   : lin stack file
 * @note
 * Copyright (C) 2023 Novosense All rights reserved.
 ****************************************************************************/
#ifndef LIN_EEPROM_H
#define LIN_EEPROM_H
/*******************************************************************************
  type definitions
*******************************************************************************/
#include <stdint.h>

#define EEPROM_UNLOCK_KEY1 0xfedcba98
#define EEPROM_UNLOCK_KEY2 0x76543210
#define UPDATE_FIRMWARE_FIX_CRC_CODE 0x7692u

#ifdef L_NAD_EEPROM
void ReadNADFromEEPROM(void);
void WriteNADToEEPROM(void);
#endif

#ifdef L_PID_EEPROM
void ReadPIDFromEEPROM(uint8_t *PIDTable, uint8_t len);
void WritePIDToEEPROM(uint8_t *PIDTable, uint8_t len);
#endif

#ifdef L_UDS_BOOTLOADER_UPDATE
void SetRequestEnterBootloader(void);
#endif

#endif
